<!--
 This  code was generated from a template.  Change the
 Status value below to something other than Generated if you have
 customized this file to prevent changes from being overwritten.

 <CreatedByUserName>INCODE-1\Dave</CreatedByUserName>
 <CreatedDate>1/2/2013</CreatedDate>
 <Status>Generated</Status>
-->
<lib:EditControl x:Class="MoPlus.SolutionBuilder.WpfClient.UserControls.Diagrams.PropertiesDiagramControl"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                     xmlns:vm="clr-namespace:MoPlus.ViewModel;assembly=MoPlus.ViewModel"
                     xmlns:EntitiesVM="clr-namespace:MoPlus.ViewModel.Entities;assembly=MoPlus.ViewModel"
                     xmlns:UI="clr-namespace:MoPlus.SolutionBuilder.WpfClient"
                     xmlns:lib="clr-namespace:MoPlus.SolutionBuilder.WpfClient.Library"
                     mc:Ignorable="d" 
                     d:DesignHeight="100" d:DesignWidth="100">
	<lib:EditControl.CommandBindings>
		<CommandBinding Command="New" CanExecute="NewCanExecute" Executed="NewExecuted"></CommandBinding>
		<CommandBinding Command="Delete" PreviewCanExecute="PreviewDeleteCanExecute" Executed="DeleteExecuted"></CommandBinding>
	</lib:EditControl.CommandBindings>
	<lib:EditControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="../../Resources/Theme.xaml" />
			</ResourceDictionary.MergedDictionaries>
			<vm:LabelHelper x:Key="labels" />
		</ResourceDictionary>
	</lib:EditControl.Resources>
	<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Background="{StaticResource ControlBackgroundBrush}">
		<Grid MinWidth="40" DataContextChanged="Grid_DataContextChanged">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"></RowDefinition>
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*"></ColumnDefinition>
			</Grid.ColumnDefinitions>
			<Expander Name="MainExpander" PreviewMouseRightButtonDown="Expander_PreviewMouseRightButtonDown" VirtualizingStackPanel.VirtualizationMode="Recycling" Grid.Row="0" Grid.Column="0" Header="{Binding Name}" IsExpanded="{Binding IsExpanded, Mode=TwoWay}">
				<Expander.ContextMenu>
					<ContextMenu>
						<MenuItem Header="{Binding MenuLabelNewProperty}" Command="New"></MenuItem>
						<MenuItem Header="{Binding MenuLabelDelete}" Command="Delete"></MenuItem>
					</ContextMenu>
				</Expander.ContextMenu>
				<DataGrid Name="MainGrid" SelectionMode="Single" PreviewMouseDown="DataGrid_MouseDown" VirtualizingStackPanel.VirtualizationMode="Recycling" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" HeadersVisibility="Column" ItemsSource="{Binding Items}">
					<DataGrid.Columns>
						<DataGridTextColumn Header="{Binding Source={StaticResource labels}, Path=PropertyNameHeader}" Binding="{Binding PropertyName}" />
						<DataGridTextColumn Header="{Binding Source={StaticResource labels}, Path=DescriptionHeader}" Binding="{Binding Description}" Width="Auto" MaxWidth="200" />
					</DataGrid.Columns>
				</DataGrid>
			</Expander>
		</Grid>
	</ScrollViewer>
</lib:EditControl>